package com.ss.util;

import org.springframework.security.core.context.SecurityContextHolder;

import com.ss.bean.User;

public class SecurityUserHolder {  
	  
    /** 
     * Returns the current user 
     *  
     * @return 
     */  
    public static User getCurrentUser() {  
        return (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();  
    }  
  
}